﻿using Sharp.Domain.Model;
using Sharp.Infrastructure.Interfaces;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sharp.Domain.PlatformBoundedContext.OAuthModule
{
    [AllowAnonymous]
    public class AuthorizationData : IAggregateRoot<int>
    {
        [Key]
        public int Id
        {
            get;
            set;
        }

       [Index]
        public string Token
        {
            get;
            set;
        }
        public string ResponseType
        {
            get;
            set;
        }

        public string GrantType
        {
            get;
            set;
        }

        public string TokenType
        {
            get;
            set;
        }
        
        public string Ticket
        {
            get;
            set;
        }
        public string RoleScope
        {
            get;
            set;
        }

        public string ClientId
        {
            get;
            set;
        }

        public string UserId
        {
            get;
            set;
        }

        public string UserName
        {
            get;
            set;
        }

        public DateTime IssuedUtc
        {
            get;
            set;
        }

        public DateTime ExpiresUtc
        {
            get;
            set;
        }

    }
}
